from manim import *

LV,QL,QH,JH='#75cfb8','#bbdfc8','#f0e5d8','#ffc478'

class p1(Scene):
    def construct(self):
        # self.add(NumberPlane())
        ca=Circle(3).shift(LEFT*2).set_color(LV)
        cb=Circle(2).next_to(ca,buff=0).set_color(LV)
        self.add(ca,cb)
        #
        a,b=ca.get_center(),cb.get_center()
        ab=Line(a,b)
        line_c=Line(UP*3,DOWN*3).next_to(ca,buff=0)
        c=line_intersection(ab.get_start_and_end(),line_c.get_start_and_end())
        self.add(
            Dot(a).set_color(LV),
            Dot(b).set_color(LV),
            Dot(c).set_color(LV)
        )
        ca,cb,c_up=Line(c,a),Line(c,b),Line(c,c+UP)
        self.add(
            ab,line_c,
            MathTex('A').next_to(a,DOWN),
            MathTex('B').next_to(b,DOWN),
            MathTex('C').next_to(c,DR),
            Angle(cb,c_up,elbow=True),
            Angle(c_up,ca,elbow=True)
        )
        self.wait()
class p2(Scene):
    def construct(self):
        # self.add(NumberPlane())
        ca=Circle(3).set_color(LV)
        cb=Circle(2).next_to(ca.get_right(),LEFT,buff=0).set_color(LV)
        self.add(ca,cb)
        #
        a,b=ca.get_center(),cb.get_center()
        ab=Line(a,b)
        line_c=Line(UP*3,DOWN*3).next_to(ca,buff=0)
        c=line_intersection(ab.get_start_and_end(),line_c.get_start_and_end())
        self.add(
            Dot(a).set_color(LV),
            Dot(b).set_color(LV),
            Dot(c).set_color(LV)
        )

        ca,cb,c_up=Line(c,a),Line(c,b),Line(c,c+UP)
        self.add(
            ab,line_c,Line(a,c),
            MathTex('A').next_to(a,DOWN),
            MathTex('B').next_to(b,DOWN),
            MathTex('C').next_to(c,DR),
            Angle(cb,c_up,elbow=True),
            Angle(c_up,ca,elbow=True)
        )
        self.wait()